package com.miyu.system.pojo.book;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

import lombok.Data;

/**
 * 章节表;
 * @author : miyu
 * @date : 2022-11-18
 */
@ApiModel(value = "章节表",description = "")
@Data
@Entity
@Table(name="book_chapter",indexes = {
        @Index(name = "index_book_chapter",columnList = "book_id")
})
public class BookChapter implements Serializable,Cloneable{
    /** 主键 */
    @Id
    @ApiModelProperty(name = "主键",notes = "")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "chapter_id", nullable = false)
    private Long chapterId ;
    /** 辅助主键;辅助主键 */
    @ApiModelProperty(name = "辅助主键",notes = "辅助主键")
    @Column(name = "fpk", nullable = false, length =32 )
    private String fpk ;
    /** 书籍主键 */
    @ApiModelProperty(name = "书籍主键",notes = "")
    @Column(name = "book_id", nullable = true, length =32 )
    private String bookId ;
    /** 章节来源 */
    @ApiModelProperty(name = "章节来源",notes = "")
    @Column(name = "chapter_source", nullable = true, length =150 )
    private String chapterSource ;
    /** 章节名称 */
    @ApiModelProperty(name = "章节名称",notes = "")
    @Column(name = "chapter_name", nullable = true, length =100 )
    private String chapterName ;
    /** 章节排序 */
    @ApiModelProperty(name = "章节排序",notes = "")
    @Column(name = "chapter_num", nullable = true, length =10 )
    private Integer chapterNum ;
    /** 更新日期 */
    @ApiModelProperty(name = "更新日期",notes = "")
    @Column(name = "update_date", nullable = false, columnDefinition = "timestamp default current_timestamp")
    private Timestamp updateDate  ;
}